//
//  ZFMainTabBarController.swift
//  map
//
//  Created by fyzq on 2024/1/24.
//

import UIKit
import GKNavigationBarSwift
class ZFMainTabBarController: UITabBarController {

    override func viewDidLoad() {
        super.viewDidLoad()

       setUI()
    }
    
    fileprivate func setUI(){
        

        let home = ZFMapboxViewController()
        let mine = ZFMineViewController()
       
        
        self.setTabbar(image: "", title: "地球", vc: home)
        self.setTabbar(image: "", title: "我的", vc: mine)
        
        tabBar.backgroundColor = R.color.bg()

        tabBar.backgroundImage = UIImage.init()
        tabBar.layer.cornerRadius = 10
        tabBar.layer.maskedCorners = [.layerMinXMinYCorner, .layerMaxXMinYCorner]

        tabBar.layer.shadowColor = UIColor.black.cgColor
        tabBar.layer.shadowOffset = CGSize(width: 0, height: 16)
        tabBar.layer.shadowOpacity = 1;
        tabBar.layer.shadowRadius = 10
        
    }
    
    
    fileprivate func setTabbar(image:String,title:String,vc:UIViewController){
        vc.tabBarItem = UITabBarItem(tabBarSystemItem: UITabBarItem.SystemItem.contacts, tag: 0)
        let navi =  ZFNavigationController.init(rootVC: vc);
        self.addChild(navi)
    }
  
}
